package com.aidong.carnival.entity;

import com.aidong.carnival.controllers.concerns.View.Base;
import com.aidong.util.QiniuUtil;
import com.fasterxml.jackson.annotation.JsonView;

public class Photo {
	private int carnivalId;
	private int idongId;
	private String url;
	@JsonView(Base.class)
	private String description;

	public Photo() {
	}

	public Photo(int carnivalId, int idongId, String url, String description) {
		this.carnivalId = carnivalId;
		this.idongId = idongId;
		this.url = url;
		this.description = description;
	}

	public int getCarnivalId() {
		return carnivalId;
	}

	public void setCarnivalId(int carnivalId) {
		this.carnivalId = carnivalId;
	}

	public int getIdongId() {
		return idongId;
	}

	public void setIdongId(int idongId) {
		this.idongId = idongId;
	}

	@JsonView(Base.class)
	public String url() {
		return QiniuUtil.QINIU_URL + url;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
